<?php
/**
 * generic models manager
 */

class DjManager {

    /**
     * @var string $model model class
     */
    public function __construct($model) {
        $this->model=$model;
    }

    /**
     * get a record by parameters
     * @param array $params
     * @return DjModel
     */
    public function get($params) {
        print_r($params);
        $class=$this->model;
        return new $class($params);
    }

    /**
     * @var string model class
     */
    protected $model;
}